package com.csun.cmny.provider.service;

import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.DmcYingShiChannel;
import com.csun.cmny.provider.model.dto.yingshi.YingShiChannelDto;
import com.csun.cmny.provider.model.dto.yingshi.YingShiChannelQueryDto;
import com.csun.cmny.provider.model.vo.yingshi.YingShiChannelVo;
import com.csun.cmny.provider.model.vo.yingshi.YingShiMonitorVo;
import com.csun.cmny.provider.model.vo.yingshi.YingShiPlayerVo;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2021/8/27 16:40
 * @Description: 萤石摄像头通道接口
 */
public interface DmcYingShiChannelService extends IService<DmcYingShiChannel> {

    /**
     * 获取播放地址
     *
     * @param id  the ying shi channel id
     *
     * @return  the ying shi player vo
     */
    YingShiPlayerVo getPlayUrl(Long id);

    /**
     * 查询萤石摄像头通道列表 - 分页
     *
     * @param yingShiChannelQueryDto    the ying shi channel query dto
     *
     * @return  the ying shi channel vo list.
     */
    List<YingShiChannelVo> queryListWithPage(YingShiChannelQueryDto yingShiChannelQueryDto);

    /**
     * 添加萤石摄像头通道信息
     *
     * @param yingShiChannelDto the ying shi channel dto
     * @param loginAuthDto      the login auth dto
     *
     * @return  the int.
     */
    Integer save(YingShiChannelDto yingShiChannelDto, LoginAuthDto loginAuthDto);

    /**
     * 修改萤石摄像头通道信息
     *
     * @param yingShiChannelDto the ying shi channel query dto
     * @param loginAuthDto      the login auth dto
     *
     * @return  the int.
     */
    Integer edit(YingShiChannelDto yingShiChannelDto, LoginAuthDto loginAuthDto);

    /**
     * 根据id删除萤石摄像头通道信息
     *
     * @param id    the ying shi camera channel id
     *
     * @return  the int.
     */
    Integer deleteById(Long id);

    /**
     * 校验通道号是否存在
     *
     * @param id    the id
     * @param deviceId  the device id
     * @param channelNo the channel no
     *
     * @return  the boolean true-不存在 false-存在
     */
    boolean checkChannelNo(Long id, Long deviceId, Integer channelNo);

    /**
     * 根据通道id获取通道信息
     *
     * @param channelId the channel id
     *
     * @return  the ying shi monitor vo
     */
    YingShiMonitorVo selectByChannelId(Long channelId);
    //查询萤石通道号
    List<DmcYingShiChannel> selectChannelById(Long id);
}
